package com.yonyou.cyxdms.sysAuth.service.dto;

import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.dto.base.DMSBaseDTO;
import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeDeserializer;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeSerializer;


/**
 * <p>
 * 
 * </p>
 *
 * @author 李贺
 * @since 2019-12-10
 */

public class TtUserLoginDTO extends DMSBaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

        private Long userLoginId;
        /**
     * 经销商公司id
     */
        private Long companyId;
        /**
     * 登录公司
     */
        private String ownerCode;
        /**
     *  职位
     */
        private Long userOrgId;
        /**
     *  组织
     */
        private Long orgId;
        /**
     * 操作时间
     */
        @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime operateDate;
        /**
     * 操作员
     */
        private Long operator;
        /**
     * 登录方式
     */
        private Integer loginWay;
        /**
     * 设备信息
     */
        private String userAgent;
        /**
     * IP
     */
        private String ip;
        /**
     * 设备名称/PC浏览器名称
     */
        private String deviceName;
        /**
     * 手机系统版本/pc的浏览器版本
     */
        private String deviceVersion;
        /**
     * 手机型号
     */
        private String deviceModel;
        /**
     * 系统平台
     */
        private String osName;
        /**
     * 浏览器类型
     */
        private String browerType;
        /**
     * app版本
     */
        private String appVersion;
        /**
     * app名称
     */
        private String appName;
        /**
     * 位置信息精度
     */
        private String longitude;
        /**
     * 位置信息维度
     */
        private String latitude;
        /**
     * 退出时间
     */
        @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime logOutDate;
        /**
     * 最后一次操作时间
     */
        @JsonDeserialize(using = JsonLocalDateTimeDeserializer.class)
    @JsonSerialize(using = JsonLocalDateTimeSerializer.class)
    private LocalDateTime lastOperateDate;
        /**
     * JWT
     */
        private String jwt;
            private Boolean isDeleted;
    
    public TtUserLoginDTO() {
        super();
    }




    public Long getUserLoginId() {
        return userLoginId;
    }


    public void setUserLoginId(Long userLoginId) {
        this.userLoginId = userLoginId;
    }



    public Long getCompanyId() {
        return companyId;
    }


    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }



    public String getOwnerCode() {
        return ownerCode;
    }


    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }



    public Long getUserOrgId() {
        return userOrgId;
    }


    public void setUserOrgId(Long userOrgId) {
        this.userOrgId = userOrgId;
    }



    public Long getOrgId() {
        return orgId;
    }


    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }



    public LocalDateTime getOperateDate() {
        return operateDate;
    }


    public void setOperateDate(LocalDateTime operateDate) {
        this.operateDate = operateDate;
    }



    public Long getOperator() {
        return operator;
    }


    public void setOperator(Long operator) {
        this.operator = operator;
    }



    public Integer getLoginWay() {
        return loginWay;
    }


    public void setLoginWay(Integer loginWay) {
        this.loginWay = loginWay;
    }



    public String getUserAgent() {
        return userAgent;
    }


    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }



    public String getIp() {
        return ip;
    }


    public void setIp(String ip) {
        this.ip = ip;
    }



    public String getDeviceName() {
        return deviceName;
    }


    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }



    public String getDeviceVersion() {
        return deviceVersion;
    }


    public void setDeviceVersion(String deviceVersion) {
        this.deviceVersion = deviceVersion;
    }



    public String getDeviceModel() {
        return deviceModel;
    }


    public void setDeviceModel(String deviceModel) {
        this.deviceModel = deviceModel;
    }



    public String getOsName() {
        return osName;
    }


    public void setOsName(String osName) {
        this.osName = osName;
    }



    public String getBrowerType() {
        return browerType;
    }


    public void setBrowerType(String browerType) {
        this.browerType = browerType;
    }



    public String getAppVersion() {
        return appVersion;
    }


    public void setAppVersion(String appVersion) {
        this.appVersion = appVersion;
    }



    public String getAppName() {
        return appName;
    }


    public void setAppName(String appName) {
        this.appName = appName;
    }



    public String getLongitude() {
        return longitude;
    }


    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }



    public String getLatitude() {
        return latitude;
    }


    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }



    public LocalDateTime getLogOutDate() {
        return logOutDate;
    }


    public void setLogOutDate(LocalDateTime logOutDate) {
        this.logOutDate = logOutDate;
    }



    public LocalDateTime getLastOperateDate() {
        return lastOperateDate;
    }


    public void setLastOperateDate(LocalDateTime lastOperateDate) {
        this.lastOperateDate = lastOperateDate;
    }



    public String getJwt() {
        return jwt;
    }


    public void setJwt(String jwt) {
        this.jwt = jwt;
    }



    public Boolean getDeleted() {
        return isDeleted;
    }


    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }



    @Override
    public String toString() {
        return "TtUserLoginDTO{" +
        "userLoginId=" + userLoginId +
        ", companyId=" + companyId +
        ", ownerCode=" + ownerCode +
        ", userOrgId=" + userOrgId +
        ", orgId=" + orgId +
        ", operateDate=" + operateDate +
        ", operator=" + operator +
        ", loginWay=" + loginWay +
        ", userAgent=" + userAgent +
        ", ip=" + ip +
        ", deviceName=" + deviceName +
        ", deviceVersion=" + deviceVersion +
        ", deviceModel=" + deviceModel +
        ", osName=" + osName +
        ", browerType=" + browerType +
        ", appVersion=" + appVersion +
        ", appName=" + appName +
        ", longitude=" + longitude +
        ", latitude=" + latitude +
        ", logOutDate=" + logOutDate +
        ", lastOperateDate=" + lastOperateDate +
        ", jwt=" + jwt +
        ", isDeleted=" + isDeleted +
        "}";
    }
    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     * @param poClass dto 需要转换的dto
     * @author 李贺
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     * @param po 需要转换的对象
     * @author 李贺
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "userLoginId");
    }

}
